<?php echo form_open('admin/dataman/connection_add');?>

<?php //if (!empty($items)): ?>
	<h3><?php echo lang('dataman.connection'); ?></h3>
	<div id="action"><?php $this->load->view('admin/partials/buttons', array('buttons' => array('add'))); ?></div>
	
	<table border="0" class="table-list">
		<thead>
			<tr>
				<th><?php echo lang('dataman.content.id'); ?></th>
				<th><?php echo anchor($link->upper_content_id, lang('dataman.connection.UpperContentID'),' class="th-link"' ); ?></th>
				<th><?php echo anchor($link->lower_content_id, lang('dataman.connection.LowerContentID'),' class="th-link"' ); ?></th>
				<th><?php echo anchor($link->weight, lang('dataman.connection.NumberofPosts') ); ?></th>
				<th><?php echo anchor($link->last_posted_time, lang('dataman.connection.lastModify'),' class="th-link"' ); ?></th>
				<th><?php echo lang('dataman.edit'); ?></th>
				<th><?php echo lang('dataman.delete'); ?></th>
			</tr>
		</thead>
		<tfoot>
			<tr>
				<td colspan="7">
					<div class="inner"><?php echo $pagination; ?></div>
				</td>
			</tr>
		</tfoot>
		<tbody>
	 	<?php foreach( $contents as $connect ): ?>
			<tr>
				<td><?php echo $connect->id; ?></td>
				<td><?php echo $connect->upper_content_id ; ?></td>
				<td><?php echo $connect->lower_content_id ; ?></td>
				<td><?php echo $connect->weight ; ?></td>
				<td><?php echo date('d/m/Y H:m:i',$connect->last_posted_time) ; ?></td>
				<td><?php echo anchor('admin/dataman/connection_edit/'. $connect->id,lang('dataman.edit'));?> </td>	
				<td><?php echo anchor('admin/dataman/connection_delete/'. $connect->id,lang('dataman.delete'));?> </td>	
			</tr>
		<?php endforeach; ?>
		</tbody>
	</table>

<?php echo form_close(); ?>